package com.tourlaid.mamagerment.service.impl

import com.tourlaid.mamagerment.entity.Area
import com.tourlaid.mamagerment.mapper.AreaMapper
import com.tourlaid.mamagerment.service.AreaService
import org.springframework.stereotype.Service
import javax.annotation.Resource

/**
 * Created by Administrator on 2017/8/16.
 */
@Service("areaService")
class AreaServiceImpl : AreaService {
    override fun queryByParentIdList(parentIdList: List<Long>): List<Area> {
        return areaMapper!!.queryByParentIdList(parentIdList)
    }

    override fun queryByParentId(parentId: Long): List<Area>? {
        return areaMapper!!.queryByParentId(parentId)
    }

    @Resource
    val areaMapper: AreaMapper? = null

    override fun getByAreaName(areaName: String): Area? {
       return areaMapper!!.getByAreaName(areaName)
    }

}